//
//  ShopcartNoDataView.m
//  FD
//
//  Created by xiaofang wang on 2019/1/2.
//  Copyright © 2019年 ZhiYuan Network. All rights reserved.
//

#import "ShopcartNoDataView.h"
@interface ShopcartNoDataView()
/**没有数据*/
@property (nonatomic, strong) UILabel *nodataLb;

@end

@implementation ShopcartNoDataView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    [self addSubview:self.nodataLb];
}


- (void)layoutSubviews {

    [self.nodataLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self);
    }];
}


- (UILabel *)nodataLb {
    if (!_nodataLb) {
        _nodataLb = [[UILabel alloc] init];
        NSString *nodataString = @"No orders yet";
        if ([NSString rb_ChineseLanguage]) {
            nodataString = @"暂无数据";
        }
        _nodataLb.text = nodataString;
        _nodataLb.textAlignment = NSTextAlignmentCenter;
        _nodataLb.textColor = [UIColor lightGrayColor];
    }
    return _nodataLb;
}
@end
